public class Animal {
    String name;
    int age;
    public Animal(String name,int age){
        this.name=name;
        this.age=age;
    }
    public  void eat(){
        System.out.println(name+"正在干饭");
    }
    public static void eatFood(Animal a){
        a.eat();
    }
    public static void main(String[] args) {
        Animal cat=new cat("元宝",12);
        Animal dog=new Dog("旺财",5);
        eatFood(cat);
    }


}
